package com.erpoa.entity;


import com.google.common.base.Objects;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Slf4j
@EqualsAndHashCode
public class MgUserDto implements Serializable {
    private String mSName;
    private String mSPassword;
    private String mSCode;

    private List<Integer> mUserPerssion;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MgUserDto mgUserDto = (MgUserDto) o;
        return Objects.equal(mSName, mgUserDto.mSName) &&
                Objects.equal(mSPassword, mgUserDto.mSPassword) &&
                Objects.equal(mSCode, mgUserDto.mSCode) &&
                Objects.equal(mUserPerssion, mgUserDto.mUserPerssion);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(mSName, mSPassword, mSCode, mUserPerssion);
    }
}
